package outoforder.leetcode01;

import outoforder.leetcode.ListNode;

/**
 * @author shhjiang_001
 * @create 2020-07-11 23:30
 */
public class Solution206 {
    public ListNode reverseList(ListNode head) {
        if (head==null || head.next==null) return head;
        ListNode last = reverseList(head.next);
        head.next.next = head;
        head.next = null;
        return last;
    }
}
